﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace iDMS.Models
{
    [MetadataType(typeof(Employee_Buddy))]
    public partial class Employee
    {
        public string FullName
        {
            get
            {
                return Name + " " + LastName;
            }
        }

        public string FullNameDepartment
        {
            get
            {
                return FullName + " (" + this.Department.ShortName+")";
            }
        }

        public string GenderLong
        {
            get
            {
                if (this.Gender == 'M')
                {
                    return "Male";
                }
                else
                {
                    return "Female";
                }
            }
        }
    }

    public class Employee_Buddy
    {
        /*
        [DataType(DataType.Date)]
        [Display(Name = "Planned Release Date")]
        [Required(ErrorMessage = "Planned Release Date is required")]
        public DateTime PlannedReleaseDate { get; set; }

        

        [Required(ErrorMessage = "Title is required")]
         public String Title { get; set; }

        [Display(Name = "Reason")]
        public int ReasonID { get; set; }

        [Display(Name = " Change Builder")]
        public int ChangeBuilderEmployeeID { get; set; }

        [DataType(DataType.Date)]
        [Display(Name = "Created Date")]
        public DateTime CreateDate { get; set; }
        */


        [Display(Name = "Firsth Name")]
        [Required(ErrorMessage = "Name is required")]
        public String Name { get; set; }

        [Display(Name = "Last Name")]
        [Required(ErrorMessage = "Last Name is required")]
        public String LastName { get; set; }

        [Required(ErrorMessage = "Phone is required")]
        public String Phone { get; set; }

        //[Required(ErrorMessage = "Identifier is required")]
        //[StringLength(15, MinimumLength = 5, ErrorMessage = "Identifier - The value must be between 5 and 15 characters. ")]
        //public string Identifier { get; set; }

    }
}